<template>
  <div class="layui-container fly-user-main">
    <div class="site-tree-mobile layui-hide">
      <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="site-tree-mobile layui-hide">
      <i class="layui-icon">&#xe602;</i>
    </div>
    <div class="site-mobile-shade"></div>

    <div class="fly-panel fly-panel-user" pad20>
      <!--
    <div class="fly-msg" style="margin-top: 15px;">
      您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
    </div>
    -->
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title" id="LAY_mine">
          <li
            data-type="mine-jie"
            lay-id="index"
            :class="titleId === 1 ? 'layui-this' : ''"
            @click="setTitleId(1)"
          >
            <router-link :to="{ name: 'MyPosts' }">我发的帖（<span>89</span>）</router-link>
          </li>
          <li
            data-type="collection"
            data-url="/collection/find/"
            lay-id="collection"
            :class="titleId === 2 ? 'layui-this' : ''"
            @click="setTitleId(2)"
          >
            <router-link :to="{ name: 'collection' }">我收藏的帖（<span>16</span>）</router-link>
          </li>
        </ul>
        <div class="layui-tab-content" style="padding: 20px 0;">
          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
// import LeftMenu from '@/components/LeftMenu'
export default {
  nmae: 'user-center',
  components: {},
  data () {
    return {
      titleId: 1
    }
  },
  methods: {
    setTitleId (id) {
      this.titleId = id
    }
  }
}
</script>

<style lang="scss" scoped>
.fly-user-main>.fly-panel {
  margin: 0px 0px 0px 20px;
}
</style>
